<template>
    <div class="newsongs">
        <div class="top-nav">
            <TabBar :tabitems="tabitems" @changeTagbar="tabItemClick"/>
        </div>
        <div class="new-content">
            <NewMusic v-if="activeItem == 0"/>
            <NewAlbum v-if="activeItem == 1"/>
        </div>
    </div>
</template>
<script>
import TabBar from '@/components/common/TabBar.vue'
import NewAlbum from './Childcomps/NewAlbum.vue';
import NewMusic from './Childcomps/NewMusic.vue';
export default {
    name: "",
    data() {
        return {
            tabitems: [{ name: "新歌速递" }, { name: "新碟上架" }],
            activeItem:0
        };
    },
    created() {
    },
    methods: {
        tabItemClick(index){
            this.activeItem = index
        }
    },
    components: { TabBar, NewAlbum, NewMusic }
}
</script>
<style lang="less" scoped>
    .top-nav{
        width: 100%;
        display: flex;
        justify-content: center;
    }
</style>